/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author alumno
 */
@Embeddable
public class ModuloCursoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "CURB_COD")
    private int curbCod;
    @Basic(optional = false)
    @Column(name = "MOD_COD")
    private int modCod;

    public ModuloCursoPK() {
    }

    public ModuloCursoPK(int curbCod, int modCod) {
        this.curbCod = curbCod;
        this.modCod = modCod;
    }

    public int getCurbCod() {
        return curbCod;
    }

    public void setCurbCod(int curbCod) {
        this.curbCod = curbCod;
    }

    public int getModCod() {
        return modCod;
    }

    public void setModCod(int modCod) {
        this.modCod = modCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) curbCod;
        hash += (int) modCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ModuloCursoPK)) {
            return false;
        }
        ModuloCursoPK other = (ModuloCursoPK) object;
        if (this.curbCod != other.curbCod) {
            return false;
        }
        if (this.modCod != other.modCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.ModuloCursoPK[ curbCod=" + curbCod + ", modCod=" + modCod + " ]";
    }
    
}
